#app {

  .main-container {
    min-height: 100%;
    transition: margin-left .28s;
    margin-left: $sideBarWidth;
    position: relative;
  }

  .sidebar-container {
    -webkit-transition: width .28s;
    transition: width 0.28s;
    width: $sideBarWidth !important;
    background-color: $menuBg;
    height: 100%;
    position: fixed;
    font-size: 0px;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    overflow: hidden;
    -webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, .35);
    box-shadow: 2px 0 6px rgba(0, 21, 41, .35);

    // reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    }

    .scrollbar-wrapper {
      overflow-x: hidden !important;
    }

    .el-scrollbar__bar.is-vertical {
      right: 0px;
    }

    .el-scrollbar {
      height: 100%;
    }

    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 50px);
      }
    }

    .is-horizontal {
      display: none;
    }

    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }

    .svg-icon {
      margin-right: 16px;
    }

    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
    }

    .el-menu-item, .el-submenu__title {
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      white-space: nowrap !important;
    }

    // menu hover
    .submenu-title-noDropdown,
    .el-submenu__title {
      &:hover {
        background-color: #09283f !important;
      }
    }

    & .theme-dark .is-active > .el-submenu__title {
      color: $subMenuActiveText !important;
    }

    & .nest-menu .el-submenu > .el-submenu__title,
    & .el-submenu .el-menu-item {
      min-width: $sideBarWidth !important;

      background-color: #09283f !important;

      &:hover {
        background-color: rgba(0, 0, 0, 0.06) !important;
      }
    }

    & .theme-dark .nest-menu .el-submenu > .el-submenu__title,
    & .theme-dark .el-submenu .el-menu-item {
      background-color: $subMenuBg !important;

      &:hover {
        background-color: $subMenuHover !important;
      }
    }
  }

  .openSidebar {
    .main-container {
      margin-left: 50px;
    }

    .sidebar-container {
      width: 50px !important;

      .el-menu--collapse {
        .el-submenu {
          & > .el-submenu__title {
            & > span {
              display: none;
            }
          }
        }
      }

      .submenu-title-noDropdown .el-tooltip .onemap {
        display: none;
      }
    }
  }

  .hideSidebar {
    .main-container {
      margin-left: 100px;
    }

    .sidebar-container {
      width: 100px !important;

      .el-menu--collapse {
        .el-submenu {
          & > .el-submenu__title {
            & > span {
              line-height: 40px;
              text-align: center;
              display: inline-block;
              width: 100%;
              color: #ffffff;
              font-size: 16px;
              font-weight: 700;
            }
          }
        }
      }
    }
  }

  .hideSidebar, .openSidebar {
    .sidebar-container {
      background-color: #09283f !important;
    }

    .submenu-title-noDropdown {
      padding: 0 !important;
      position: relative;
      background-color: #09283f !important;
      height: 88px;

      .el-tooltip {
        padding: 0 !important;

        .onemap {
          line-height: 40px;
          text-align: center;
          display: inline-block;
          width: 100%;
          color: #ffffff;
          font-size: 16px;
          font-weight: 700;
        }

        .svg-icon {
          margin: 0 auto;
          width: 40px;
          height: 40px;
          display: block;
          color: #ffffff;
        }
      }
    }

    .submenu-title-noDropdown:hover {
      background-color: #103d5f !important;
    }

    .el-submenu {
      overflow: hidden;

      & > .el-submenu__title {
        padding: 0 !important;
        height: 88px;
        line-height: 40px;
        background-color: #09283f !important;

        .svg-icon {
          margin: 0 auto;
          width: 40px;
          height: 40px;
          display: block;
          color: #ffffff;
        }
      }

      & > .el-submenu__title:hover {
        background-color: #103d5f !important;
      }
    }


  }

  .el-menu--collapse .el-menu .el-submenu {
    min-width: $sideBarWidth !important;
  }

  // mobile responsive
  .mobile {
    .main-container {
      margin-left: 0px;
    }

    .sidebar-container {
      transition: transform .28s;
      width: $sideBarWidth !important;
    }

    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(-$sideBarWidth, 0, 0);
      }
    }
  }

  .withoutAnimation {

    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}

// when menu collapsed
.el-menu--vertical {

  -webkit-box-shadow: 5px 5px 10px #888;
  box-shadow: 5px 5px 10px #888;
  -webkit-transition: all .5s ease;
  transition: all .5s ease;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  border-radius: 5px;

  & > .el-menu {
    .svg-icon {
      margin-right: 16px;
      color: #ffffff;
    }
  }

  h3 {
    text-align: center;
    height: 50px;
    line-height: 50px;
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 700;
  }

  .nest-menu {
    height: 56px;

    .el-menu-item, .el-submenu__title {
      margin: 10px;
      border-radius: 4px;
      background: #233fa7;

      span {
        color: #ffffff;
      }
    }
  }

  .nest-menu .el-submenu > .el-submenu__title,
  .el-menu-item {
    &:hover {
      // you can use $subMenuHover
      background: #103d5f !important;

      span {
        color: #00ffcf;
      }
    }
  }

  .nest-menu .el-menu-item, .nest-menu .el-submenu .el-submenu__title {
    background-color: #09283f !important;
  }

  .nest-menu .el-menu-item:hover {
    // background-color: #103d5f !important;
    background: #103d5f !important;

    span {
      color: #00ffcf;
    }
  }

  // the scroll bar appears when the subMenu is too long
  > .el-menu--popup {
    background-color: #ffffff !important;

    &::-webkit-scrollbar-track-piece {
      background: #d3dce6;
    }

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #99a9bf;
      border-radius: 20px;
    }
  }
}
